Web Objects reference

Query Objects provide necessary HTML forms to query or search the EMu database collection.
Query Objects | Description |
---|---|
BasicQueryForm |
include file: A simple keyword query form. The form contains a single text field and a search button. A simple drop list is provided so a user can modify what is queried. It's ideal for adding simple search functionality to an existing web page and provides users with an interface similar to standard web search engines such as Yahoo and Google. |
AdvancedQueryForm |
include file: The AdvancedQueryForm offer the user the ability to search with rules like "all the words", "any of the words", "sounds like words" and "exact phrase". |
DetailedQueryForm |
include file: The DetailedQueryForm offers power users the ability to query specific EMu database fields. The Query Form is aimed more at researchers and existing EMu users. |
PreConfiguredQuery |
include file: The PreConfiguredQuery object is used to construct links that execute common queries. For instance you could use the object to provide a link on a website called "Click here to view our Oil Paintings collection". These entry points into the EMu collection provide casual web users with easy access to browse interesting items in the collection. |
RandomQuery |
include file: The RandomQuery object will return a randomized result list. This again is an interesting entry point for casual web users who are simply interested in browsing some items in the collection. |

All Query Forms |
||
---|---|---|
Language |
Value: |
The display language for the object. |
Type: |
string |
|
Default: |
"English" |
|
Example: |
|
|
Restriction |
Value: |
Restrict the query to a particular subset of the collection. For instance, a web developer could place a query form on the bottom of a Dinosaur web page to allow visitors to query on the Dinosaur collection. The |
Type: |
string |
|
Default: |
None |
|
Example: |
|
|
Title |
Value: |
The title text displayed on the top of the query form. |
Type: |
string |
|
Default: |
"Search our collection..." |
|
Example: |
|
|
Width |
Value: |
Width of the query form in pixels or percent. Control is limited due to layout requirements, however the ability to fine tune width may be useful in some circumstances. |
Type: |
string |
|
Default: |
"80%" |
|
Example: |
|
|
FontFace |
Value: |
The font used for any text in the query form. A font-group listed in order of preference is also possible. |
Type: |
string |
|
Default: |
None - Form will inherit style as determined by surrounding HTML. |
|
Example: |
|
|
FontSize |
Value: |
The size of the text used in the body of the query form. |
Type: |
string |
|
Default: |
None - Form will inherit style as determined by surrounding HTML. |
|
Example: |
|
|
TitleTextColor |
Value: |
A single HTML colour code for the text in the query form's title. |
Type: |
string |
|
Default: |
None - Form will inherit style as determined by surrounding HTML. |
|
Example: |
|
|
BodyTextColor |
Value: |
A single HTML colour code for the text in the query form's body. |
Type: |
string |
|
Default: |
None - Form will inherit style as determined by surrounding HTML. |
|
Example: |
|
|
BorderColor |
Value: |
A single HTML colour code for the query form border. |
Type: |
string |
|
Default: |
"#000000" - Black |
|
Example: |
|
|
BodyColor |
Value: |
A single HTML colour code for the query form's background. |
Type: |
string |
|
Default: |
None - The form will display the pages background colour. |
|
Example: |
|
|
ResultsListPage |
Value: |
An absolute or relative path for the page where any query results are be displayed. This page must contain a |
Type: |
string |
|
Default: |
||
Example: |
|
|
Basic and Advanced Query Forms |
||
Options |
Value: |
An array of terms that list in the drop list selection box on the query form. The array should be composed of |
Type: |
array |
|
Default: |
[catalogue dependent] |
|
Example: |
e.g.: ' |
|
Fields |
Value: |
An array of EMu field names that should display on the |
Type: |
array |
|
Default: |
[catalogue dependent] |
|
Example: |
Advanced Use: Querying over multiple back-end fields is possible. Use a pipe ( | ) seperated list of fields names. e.g. Advanced Use: The Fields array in the detailed query form may also contain Advanced Example: <?php $queryform = new GalleryDetailedQueryForm; $sitSiteNumber = new QueryField; $sitSiteNumber->ColName = 'SitSiteNumber'; $sitSiteNumber->ColType = 'integer'; $expStartDate = new QueryField; $expStartDate->ColName = 'ExpStartDate'; $expStartDate->ColType = 'date';
$queryform->Fields = array( $sitSiteNumber , 'IdeFiledAsName', $expStartDate , 'ClaClass_tab'); ... ?> |
|
Hints |
Value: |
An array of |
Type: |
array |
|
Default: |
[catalogue dependent] |
|
Example: |
$queryform->Hints = array( 'TitMainTitle' => '[e.g. The Lord of the Rings]', 'CatNumber' => '[e.g. 1234-A]' ); |
|
DropDownLists |
Value: |
An array of |
Type: |
array |
|
Default: |
[catalogue dependent] |
|
Example: |
$queryform->DropDownLists = array('TitCollectionArea' => '|Oil Paintings|French Art|Water Colour'); |
|
Example 2: |
$queryform->DropDownLists = array('TitCollectionArea' => 'eluts:Collection Area'); Tip: To give the user the option of selecting nothing (null query) begin the list with a pipe. i.e. |
|
Advanced Use: |
If the internal EMu lookup table is a member of a Hierarchy, suffix the Lookup table with the associated level in the hierarchy using array reference syntax. |
|
Advanced Example: |
$queryform->DropDownLists = array('LocCountry_tab' => 'eluts:Continent[2]', ...); |
|
LookupLists |
Value: |
An array of |
Type: |
array |
|
Default: |
[catalogue dependent] |
|
Example: |
$queryform->LookupLists = array('TitCollectionArea' => 'Collection Area'); |

All ResultList
objects display results from a database query. Queries are generated by the user with a Query Form object. Alternatively, a pre-configured query button (see below) could be used in conjunction with the ResultsList
object. Clicking on any item listed in the results list will take the user to a detailed display page. A choice of two different ResultList
objects is available to the website designer. Each emphasizes different information and format styles.
StandardResultsList |
include file: The StandardResultList will display results oriented down the page in blocks of 20. The objects' summary data and thumbnail image (if available) will be displayed for each matching object. |
ContactSheet |
The ContactSheet displays only the thumbnail images associated with the query results. A StandardResultsList object usually contains a link to a ContactSheet results list, providing the user with an alternative display. A web designer could use this object in association with the PreConfiguredQueryButton to display images of works painted by a particular artist for example. |

The following properties are common to all ResultList objects.
All Query Forms: |
||
Language |
Value: |
The display language for the object. |
Type: |
string |
|
Default: |
English |
|
Example: |
|
|
DisplayThumbnails |
(only available in the |
|
Value: |
Turn thumbnail images on or off. |
|
Type: |
integer |
|
Default: |
1 (yes) |
|
Example: |
|
|
NoResultsText |
Value: |
Set the message text display in place of the |
Type: |
string |
|
Default: |
None - displays the default no records matched message. |
|
Example: |
|
|
NoResultsTextFromFile |
Value: |
Path to a valid file containing text or HTML. The content of the file will be used in place of the Special Notes: This file should not contain a full HTML page (i.e. no body tags). It should contain a subset suitable for embedding in the |
Type: |
string |
|
Default: |
1 None - displays the default no records matched message. |
|
Example: |
|
|
Width |
Value: |
Horizontal width restriction on the |
Type: |
string |
|
Default: |
"80%" |
|
Example: |
|
|
FontFace |
Value: |
The font used for all text in the results list. May also be a font-group listed in order of precedence. |
Type: |
string |
|
Default: |
None - Form will inherit style as determined by surrounding HTML. |
|
Example: |
|
|
FontSize |
Value: |
The size for all text displayed in the results list. |
Type: |
string |
|
Default: |
None - Form will inherit style as determined by surrounding HTML. |
|
Example: |
|
|
TextColor |
Value: |
The HTML colour code for the object's text. |
Type: |
string |
|
Default: |
None - Form will inherit style as determined by surrounding HTML. |
|
Example: |
|
|
BodyColor |
Value: |
The HTML colour code for the background of items listed in the results list. |
Type: |
string |
|
Default: |
None |
|
Example: |
|
|
HighlightColor |
Value: |
The HTML colour code for the background for every second item in the results list. The property is used to improve the appearance of the results list. |
Type: |
string |
|
Default: |
None |
|
Example: |
|
|
DisplayPage |
Value: |
An absolute or relative path for the page containing a |
Type: |
string |
|
Default: |
"http://mysite.com/web/pages/client/DisplayPage.htm" |
|
Example: |
|
|
ContactSheetPage |
(StandardResultsList object only) |
|
Value: |
An absolute or relative path for the page containing a |
|
Type: |
string |
|
Default: |
"http://mysite.com/web/pages/client/ContactSheet.htm" |
|
Example: |
|
|
ResultsListPage |
(ContactSheet object only) |
|
Value: |
An absolute or relative path for the page containing the |
|
Type: |
string |
|
Default: |
"http://mysite.com/web/pages/client/Display.htm" |
|
Example: |
|
|
Fields |
Value: |
An array of field names to display in the results list. For the |
Type: |
array |
|
Default: |
[catalogue dependent] |
|
Example: |
|
|
Advanced Use: |
The fields array will also accept
Fields are embedded in the Format property of the |

Display objects offer a web designer a number of alternatives for presenting information extracted from a single record. The main use for display objects is in conjunction with ResultList
objects. Clicking on the item displayed in a results list should direct the user to a page containing a Display object. Display object will automatically format and display pertinent information retrieved from the Catalogue or database record.
Alternatively Display objects could be used to generate a Highlights page. For instance, a web designer may wish to build a Van Gogh page. By identifying the IRNs (internal record number) of all Van Gogh's works in the EMu Catalogue, a web designer could place a number of Display objects on a webpage, setting each object's IRN property to the appropriate value. The page will dynamically retrieve information on Van Gogh's works in the Catalogue.
Web designers have a choice of a number of Display objects depending on their content and format requirements. The designer also has the ability to control what fields are displayed and in what order they are presented to the user.
StandardDisplay |
The StandardDisplay object lists the records content in a html table. Associated media and thumbnails will be displayed. |
PartyDisplay |
Contains typical information of interest to web users. Intended for displaying information about artists, creators and other contributors. |

The following properties are common to all Display
objects:
IRN |
Value: |
An internal record number. This will force the object to display information from the corresponding item in the EMu Catalogue. This property is not normally used. It is provided so designers can force an object to always display the same record. |
Default: |
None - The object expects to receive irn information from a |
|
Example: |
|
|
DisplayImage |
Value: |
Turn image on or off. |
Type: |
Integer 0 or 1 |
|
Default: |
1 |
|
Example: |
|
|
DisplayAllMedia |
Value: |
Cause the |
Type: |
Integer 0 or 1 |
|
Default: |
1 |
|
Example: |
|
|
Language |
Value: |
The display language for the object. |
Type: |
string |
|
Default: |
"English" |
|
Example: |
|
|
Width |
Value: |
Horizontal width restriction on the |
Type: |
string |
|
Default: |
"80%" |
|
Example: |
|
|
FontFace |
Value: |
The font used for all text. May also be a font group listed in order of preference. |
Type: |
string |
|
Default: |
None - Form will inherit style as determined by surrounding HTML. |
|
Example: |
|
|
FontSize |
Value: |
The size for all text displayed in the object's body. |
Type: |
string |
|
Default: |
None - Form will inherit style as determined by surrounding HTML. |
|
Example: |
|
|
TitleTextColor |
Value: |
The HTML colour code for the title text. |
Type: |
string |
|
Default: |
None - Form will inherit style as determined by surrounding HTML. |
|
Example: |
|
|
BodyTextColor |
Value: |
The HTML colour code for the body text. |
Type: |
string |
|
Default: |
None - Form will inherit style as determined by surrounding HTML. |
|
Example: |
|
|
BodyColor |
Value: |
The HTML colour code for the background of the |
Type: |
string |
|
Default: |
None |
|
Example: |
|
|
BorderColor |
Value: |
The HTML colour code for the border around the |
Type: |
string |
|
Default: |
None - No border will be visible. |
|
Example: |
|
|
Database |
Value: |
The back-end EMu database from which to extract the data. |
Type: |
strings |
|
Default: |
'ecatalogue' |
|
Example: |
|
|
SuppressEmptyFields |
Value: |
Control if empty fields are displayed on the |
Type: |
Integer 0 or 1 |
|
Default: |
1 (don't show empty fields) |
|
Example: |
|
|
Fields |
Value: |
An array of EMu field names to list on the |
Type: |
array of strings |
|
Default: |
[catalogue dependent] |
|
Example: |
|

Miscellaneous objects are a growing set of Web Objects developed at the request of EMu web developers. The are located in the /web/objects/common
directory.

The RandomQuery
object is used to construct a link that will display a query result composed of a random set of records (catalogue items).
Example:
<?php
require_once('../../objects/common/RandomQuery.php');
$RandomQry = new RandomQuery;
$RandomQry->LowerIRN = 1;
$RandomQry->UpperIRN = 12000;
$RandomQry->MaxNumberToReturn = 50;
$RandomQry->PrintRef();
?>">Click Here

The majority of web users enjoy exploring the internet for entertainment. Database searching facilities are fine for people who know what they're looking for, but many visitors would rather browse a collection. The PreConfiguredQuery
objects offer a way of providing users with a quick path to some of your collection's highlights.
Example:
<?php
$quicklink = new PreConfiguredQuery;
$quicklink->Text = "Click here to see our carvings collection";
$quicklink->CollectionArea = "carvings";
$quicklink->ResultsPage = "mydir/results.php";
$quicklink->Show();
?>

The Multimedia module in EMu offers a fantastic facility for storing and managing collections of digital images. Web developers can retrieve images directly by referencing the webmedia.php
file.
Note: Only images in the multimedia module with the Publish on Internet option set can be retrieved by public web users.
Example:
http://mywebsite.com/web/objects/common/webmedia.php?type=thumb&irn=12
http://mywebsite.com/web/objects/common/webmedia.php?&irn=134

This document is intended for EMu developers only.
web (~emu/client/web) |
This is the root or top-level directory associated with EMuWeb. All PHP web pages in EMu are stored in this directory. The root directory contains EMuWeb's configuration file. Files below this level should never be edited or removed by anyone except Axiell Staff. Any custom pages or scripts developed by a 3rd party should follow the guidelines outlined in Developing Custom Pages. |
web/pages |
All files stored below this directory contain HTML pages. Some of the pages contain Web Objects for the presentation of dynamic content. This section of the directory structure is known as the presentation layer and primarily focus on how the site looks. No programming code or logic should be placed in these files. |
web/pages/shared |
Pages in this directory are shared between all EMu clients and Catalogue types. Examples include help files. |
web/pages/client |
This directory contains pages specific to a particular EMu Catalogue or client. These pages make use of the Web Object designed for the given Catalogue structure and client requirements. |
web/objects |
All files stored below this directory are PHP code files. They contain the logic for building the Web Objects and other dynamic components in EMuWeb. This section is know as the application logic layer. Files below this directory are not designed to be displayed in a browser. They contain a library of programming code for use in pages. Most of the programming code is presented in the form of PHP classes. |
web/objects/lib |
This directory contains PHP code associated with the core of EMuWeb. The code in here is not intended for direct use in PHP pages, but rather designed as helper code. The helper code is used by developers to assemble a Web Object. |
web/objects/client |
Files in this directory contain Web Objects designed specifically for a given client. These objects are intended for direct use in the HTML pages stored under the Files in this directory make use of the code stored in |
web/objects/common |
A number of Web Objects are not tailored to a specific client. They are generic or common to all clients or Catalogue types. These objects are stored in this directory. Examples include objects to help with pre-configured queries, and data exporting objects. Objects in this directory are designed for direct use in HTML pages. |
web/objects/templates |
This directory contains sample code for making objects for a new client. These files can be copied into the newly created |
web/intranet |
The intranet directory should contain objects and pages that are intended for intranet use only. They will be locked from public access or password protected. The directory structure under this directory should follow the same structure as used in the root ( |
web/webservices |
Webservices are XML based APIs (Application Programming Interfaces) or functions for use by remote web applications. At present, EMuWeb provides interfaces for the querying of EMu databases from remote locations. |
web/work |
The work directory only exists in the EMu master directory structure. It is not shipped with the server release of EMu. It's intended for use by EMu developers. It's a good place for storing test code or experiments. |
web/documentation |
This directory will contain an HTML version of the EMuWeb system's public documentation. |

web/objects/client |
|
DisplayObjects.php |
Calls Can specify the database to use by adding this line:
OR
Can add back reference fields like this:
Can add a new table like this:
Can add a new field like this:
Can add a link like this:
OR
|
QueryForms.php |
Calls
To search fields in more than one database from one Query class object use the following format:
e.g.:
|
ResultsList.php |
Calls Can specify the database to use by adding this line:
OR
|
web/intranet/objects/client |
|
DisplayObjects.php |
Everything that applies to the files in The following changes must be made to
|
web/objects/client /strings |
|
english.php |
Changes the table field name, query form strings and display strings to use chosen language. i.e. |
french.php |
As above, but in French. |
web/objects/lib (Do not modify these files) |
|
BaseDisplayObjects.php |
Calls |
BaseQueryForms.php |
Calls |
BaseQueryGenerator.php |
Calls |
BaseResultsList.php |
Calls |
border.php |
Contains one class: |
common.php |
Calls |
KeywordMarkup.php |
Calls |
media.php |
Calls |
querybuilder.php |
Calls |
querytest.php |
Used for testing. Can make a copy of this file and modify. Sets up an array of eparties fields, does a query on these fields and prints the results. |
Security.php |
Calls |
serverconnection.php |
Calls |
texquery.php |
Calls |
webinit.php |
Global definitions and environment settings. i.e. global directory and file definitions and no image icons. |
xmlparser.php |
Parses the xml. |
web/objects/lib/strings |
|
english.php |
Changes strings such as ' |
french.php |
As above, mais en français |
web/pages/client |
|
AdvQuery.php
|
These files control the page layout. The font colour, font size, background colour, etc. are chosen here. These pages do not control the content of the pages (other than whether or not images are displayed). The files under |
Elements in |
|
DisplayObjects.php |
|
ResultsList.php |
|
ContactSheet.php |
|
web/intranet/pages/client |
|
Everything that applies to the files in These changes must be made to the following files: |
|
AdvQuery.php |
$queryform->ResultsListPage = "ResultsList.php"; $queryform->Intranet = 1; |
ContactSheet.php |
$resultlist->DisplayPage = "Display.php"; $resultlist->Intranet = 1; |
Display.php |
$display->Intranet = 1; |
DtlQuery.php |
$queryform->ResultsListPage = "ResultsList.php"; $queryform->Intranet = 1; |
PartyDisplay.php |
$display->Intranet = 1; |
Query.php |
For Each: $MediaLink->ResultsListPage = "ResultsList.php"; $MediaLink->Intranet = 1; $RandomQry->ResultsListPage = "ResultsList.php"; $RandomQry->Intranet = 1; $queryform->ResultsListPage = "ResultsList.php"; $queryform->Intranet = 1; |
ResultsList.php |
$resultlist->ContactSheetPage = "ContactSheet.php"; $resultlist->DisplayPage = "Display.php"; $resultlist->Intranet = 1; |
web/pages/client/images |
|
All images appearing on display pages are stored in this directory. All images appearing on results pages are stored in the |